import request from '../../utils/request'

export function requestSwiper () {
    return new Promise(resolve => {
        request.get('/banner/list').then(res => {
            resolve(res.data)
        })
    })
}

export function requestAddSwiper (params) {
    return new Promise(resolve => {
        request.post('/banner/add', params).then(res => {
            resolve(res.data)
        })
    })
}

export function requestDeleteSwiper (id) {
    return new Promise(resolve => {
        request.get('/banner/delete', {
            params: {
                bannerid:id
            }
        }).then(res => {
            resolve(res.data)
        })
    })
}

export function requestDeleteAllSwiper(){
    return new Promise(resolve => {
        request.get('/banner/removeAll').then(res=>resolve(res.data))
    })
}
